import math
n=input('Input an integer:')
n=int(n)
m=math.ceil(math.sqrt(n)+1)
for i in range(2,m):
    if n%i==0 and i<n:
        print('NO')
        break
    else:
        print('Yes')
